package com.archermind.style.bean;

import com.feng.fengDUtil.dao.annotation.ColumnIgnore;
import com.feng.fengDUtil.dao.annotation.Id;
import com.feng.fengDUtil.dao.annotation.Table;

import java.io.Serializable;
import java.util.Date;

@Table("instance")
public class Instance implements Serializable {

    @Id
    private Integer id;
    private String name;
    private String comment;
    private Integer  sceneId;
    @ColumnIgnore
    private Integer  sceneCode;
    private Integer folderId;
    private String baseMapStyle;

    private Date createTime;
    private Integer creator;
    private Integer modifier;
    private Date modifyTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCreator() {
        return creator;
    }

    public void setCreator(Integer creator) {
        this.creator = creator;
    }

    public Integer getModifier() {
        return modifier;
    }

    public void setModifier(Integer modifier) {
        this.modifier = modifier;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Integer getSceneId() {
        return sceneId;
    }

    public void setSceneId(Integer sceneId) {
        this.sceneId = sceneId;
    }

    public Integer getFolderId() {
        return folderId;
    }

    public void setFolderId(Integer folderId) {
        this.folderId = folderId;
    }

    public Integer getSceneCode() {
        return sceneCode;
    }

    public void setSceneCode(Integer sceneCode) {
        this.sceneCode = sceneCode;
    }

    public String getXmlName(){
       return "style_" + (this.getSceneCode()==null?this.getSceneId():this.getSceneCode()) + ".xml";
    }

    public String getBaseMapStyle() {
        return baseMapStyle;
    }

    public void setBaseMapStyle(String baseMapStyle) {
        this.baseMapStyle = baseMapStyle;
    }
}
